package cn.itsource.controller;

import cn.itsource.service.IUserAddressService;
import cn.itsource.util.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author : 张金铭
 * @description :
 * @create :2022-11-26 09:55:00
 */
@Slf4j
@RestController
@RequestMapping("/userAddress")
public class UserAddressController {

    @Resource
    private IUserAddressService userAddressService;

    @GetMapping("/getAddressById/{id}")
    public JsonResult getAddressById(@PathVariable("id") Long id){
        return userAddressService.getByUid(id);
    }
}
